from matplotlib import pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import pandas as pd
figure = plt.figure()
ax = Axes3D(figure)
X = np.arange(1, 4.3, 0.1)
para_mer = pd.read_csv('parameters.csv')
X = para_mer['std']
Y = para_mer['average']
Z = para_mer['finalValue']
ax.plot_trisurf(X, Y, Z)
plt.show()


import matplotlib.pyplot as plt
import seaborn as sns
# f, (ax1, ax2) = plt.subplots(figsize=(6, 4), nrows=2)


cmap = sns.cubehelix_palette(start=1.5, rot=3, gamma=0.8, as_cmap=True)
pt = para_mer.pivot(index='std', columns='average', values='finalValue')

sns.heatmap(pt, linewidths=0.05,vmax=pt.max().max(), vmin=pt.min().min(), cmap=cmap)
# ax1.set_title('cubehelix map')
# ax1.set_xlabel('')
# ax1.set_xticklabels([])
# ax1.set_ylabel('kind')
plt.show()

# R_list = para_mer.sort_values(['std','average'])['finalValue'].tolist()
# Y = np.arange(5, 76, 1)
# X, Y = np.meshgrid(X, Y)
# R = np.sqrt(X**2 + Y**2)
#
# ax.plot_surface(X, Y, R, rstride=1, cstride=1, cmap='rainbow')
# plt.show()
